<?php use \TicTacToe\Model\Board; ?>
<table>
	<?php for($row=0; $row<3; ++$row): ?>
	<tr>
		<?php for($column=0; $column<3; ++$column): 
			$index = $row*3 + $column;
			$field = $board->getField($index);
		?>
			<td>
			<?php if(isset($disabled) && $disabled): ?>
				<?= $field ?>
			<?php else: ?>
					<input 
						type="submit" 
						name="<?= $index ?>" 
						value="<?= $field ?>" 
						<?= $field == Board::EMPTY_MARK ? "" : 'disabled="disabled"' ?> 
					>
			<?php endif ?>
			</td>
		<?php endfor ?>
	</tr>
	<?php endfor ?>
</table>